/**
 * 
 */
package cas.server.ldap.authe.decode;

import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;

/**
 * @author Cre.Gu
 *
 */
public class HexCredentialDecoder implements CredentialDecoder {

	@Override
	public byte[] decode(String credential) {
		try {
			return Hex.decodeHex(credential.toCharArray());
		} catch (DecoderException e) {
			return new byte[0];
		}
	}

}
